home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / game / patch / WHDIGamesH-M.lzh / games / HollywoodPokerPro.lha / HPokerPro / HPokerProInstall < prev    next >
Text File  |  1998-08-10  |  3KB  |  170 lines

  1. ;Patcher-install-script for Gore-Design-Installs
  2. ;****************************
  3.  
  4. (set #readme-file (cat @app-name ".Txt"))    ; name of readme file
  5. (set #cleanup "")                ; files to delete after install
  6. (set #last-file "HPokerProData/myri5")        ; last file imager should create
  7.  
  8. ;****************************
  9. ;----------------------------
  10. ; Checks if given program is reachable via the path
  11. ; if not abort install
  12. ; IN:  #program - to check
  13. ; OUT: -
  14.  
  15. (procedure P_chkrun
  16.   (if
  17.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  18.     ("")
  19.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the WHDLoad package." #program))
  20.   )
  21. )
  22.  
  23. ;****************************
  24.  
  25. (set #program "WHDLoad")
  26. (P_chkrun)
  27.  
  28. (set #program "Patcher")
  29. (P_chkrun)
  30.  
  31. (if
  32.   (exists #readme-file)
  33.   (if 
  34.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  35.     ("")
  36.     (run ("SYS:Utilities/More %s" #readme-file))
  37.   )
  38. )
  39.  
  40. (if
  41.   (= @user-level 2)
  42.   (
  43.     (set #CI_drive
  44.       (askchoice
  45.     (prompt "Select source drive for diskimages")
  46.     (default 0)
  47.     (choices "DF0:" "DF1:" "DF2:" "DF3:")
  48.     (help @askchoice-help)
  49.       )
  50.     )
  51.     (if
  52.       (= #CI_drive 0)
  53.       (set #CI_drive "DF0:")
  54.     )
  55.     (if
  56.       (= #CI_drive 1)
  57.       (set #CI_drive "DF1:")
  58.     )
  59.     (if
  60.       (= #CI_drive 2)
  61.       (set #CI_drive "DF2:")
  62.     )
  63.     (if
  64.       (= #CI_drive 3)
  65.       (set #CI_drive "DF3:")
  66.     )
  67.   )
  68.   (
  69.     (set #CI_drive "DF0:")
  70.   )
  71. )
  72.  
  73. (set @default-dest
  74.   (askdir
  75.     (prompt ("Where should \"%s\" be installed ?\nA drawer \"%s\" will automatically be created." @app-name @app-name))
  76.     (help @askdir-help)
  77.     (default @default-dest)
  78.     (disk)
  79.   )
  80. )
  81. (set #dest (tackon @default-dest @app-name))
  82. (if
  83.   (exists #dest)
  84.   (
  85.     (set #choice
  86.       (askbool
  87.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  88.         (default 1)
  89.         (choices "Delete" "Skip")
  90.         (help @askbool-help)
  91.       )
  92.     )
  93.     (if
  94.       (= #choice 1)
  95.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  96.     )
  97.   )
  98. )
  99. (makedir #dest
  100.   (help @makedir-help)
  101. )
  102. (makedir (tackon #dest "HPokerProData")
  103.   (help @makedir-help)
  104. )
  105. (copyfiles
  106.   (help @copyfiles-help)
  107.   (source ("/%s.info" @app-name ))
  108.   (dest @default-dest)
  109. )
  110.  
  111. ;----------------------------
  112.  
  113. (copyfiles
  114.   (help @copyfiles-help)
  115.   (source ("%s.info" @app-name ))
  116.   (dest #dest)
  117. )
  118. (copyfiles
  119.   (help @copyfiles-help)
  120.   (source ("%s.Slave" @app-name ))
  121.   (dest #dest)
  122. )
  123. (copyfiles
  124.   (help @copyfiles-help)
  125.   (source ("%sInstall.info" @app-name ))
  126.   (dest #dest)
  127. )
  128. (copyfiles
  129.   (help @copyfiles-help)
  130.   (source ("%sInstall" @app-name ))
  131.   (dest #dest)
  132. )
  133. (copyfiles
  134.   (help @copyfiles-help)
  135.   (source ("%s.Imager" @app-name ))
  136.   (dest #dest)
  137. )
  138. (if
  139.   (exists #readme-file)
  140.   (
  141.     (copyfiles
  142.       (help @copyfiles-help)
  143.       (source #readme-file)
  144.       (dest #dest)
  145.     )
  146.     (copyfiles
  147.       (help @copyfiles-help)
  148.       (source ("%s.info" #readme-file))
  149.       (dest #dest)
  150.     )
  151.   )
  152. )
  153.  
  154. (run ("Assign \"%s:\" \"%s\"" @app-name #dest))
  155. (run ("Patcher -p%s.Imager -s%s" @app-name #CI_drive))
  156. (run ("Assign \"%s:\" Remove" @app-name))
  157.  
  158. (if
  159.   (exists (tackon #dest #last-file))
  160.   ("")
  161.   (abort "Diskimaging not successful !\nThe Patcher couldn't create all files needed!")
  162. )
  163.  
  164. ;----------------------------
  165.  
  166. (run ("Delete %s ALL QUIET FORCE" #cleanup))    ;delete temporary files
  167.  
  168. (exit)
  169.  
  170.